home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Blinds
/
effect2.txt
Wrap
Text File
|
2004-03-19
|
2KB
|
68 lines
// main_init function
main_init = function(mc){
box = function(mc,tl_x, tl_y, br_x, br_y, cf ){
mc.lineStyle();
mc.beginFill(cf);
mc.moveTo (tl_x,tl_y);
mc.lineTo (br_x,tl_y);
mc.lineTo (br_x,br_y);
mc.lineTo (tl_x,br_y);
mc.endFill();
}
subs_done = true;
mc.duplicateMovieClip("copy",6);
createEmptyMovieClip("m1",7);
createEmptyMovieClip("m2",8);
mc.setMask(m1);
copy.setMask(m2);
b = mc.getBounds(mc);
if (vertical_blinds){
if (!out_effect) copy._x = mc._x = mc._width;
for (i=b.xMin; i < b.xMax;i+=2 * blind_size){
box(m1,i,b.yMin,i + blind_size,b.yMax,0);
box(m2,i + blind_size,b.yMin,i + 2 * blind_size,b.yMax,0);
}
} else {
if (!out_effect) copy._y = mc._y = mc._height;
for (i=b.yMin; i < b.yMax;i+=2 * blind_size){
box(m1,b.xMin,i,b.xMax,i + blind_size,0);
box(m2,b.xMin,i + blind_size,b.xMax,i + 2 * blind_size,0);
}
}
}
// main_effect function
main_effect = function(mc,frame){
perc = frame / lastsubframe;
perc = linear_speed ? 1-perc : 1-Math.sin(perc*deg90);
if (out_effect) perc = 1-perc;
if (vertical_blinds){
mc._x = perc * mc._width;
copy._x = -mc._x;
} else {
mc._y = perc * mc._height;
copy._y = -mc._y;
}
if (frame == lastsubframe){
if (out_effect) mc._alpha = 0;
mc.setMask(null);
m1.removeMovieClip();
m2.removeMovieClip();
copy.removeMovieClip();
end_effect = true;
}
}
// sub_init function
sub_init = function(mc){
}
// sub_effect function
sub_effect = function(mc,frame){
}